package com.ysw.validator.validate_collections;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @ClassName Element
 * @Description TODO
 * @Author ysw
 * @Date 2022/5/13 18:29
 */
@Data
public class Element {
    @NotBlank(groups = {ELementAdd.class},message = "元素名称不能为空")
    private String ename;
    @NotNull(groups = {ELementAdd.class,ELementUpdate.class},message = "元素年龄不能为空")
    private Integer eAge;


    public interface ELementAdd{};
    public interface ELementUpdate{};
}